<?php
namespace app\common\service;

use think\facade\Request;

/**
 * 基础服务类
 */
abstract class BaseService
{
    /**
     * Request实例
     * @var \think\Request
     */
    protected $request;

    /**
     * 版本号
     */
    protected $version;

    /**
     * 构造函数
     *
     * @return void
     */
    public function __construct()
    {
        // 输入
        $this->request = Request::instance();

        // 版本号
        $version       = $this->request->param("version", "1.0.0", "trim");
        $this->version = intval(str_ireplace(".", "", $version));
    }
}
